const mysql = require("mysql");

function excSql(spl, callback) {
    const conn = mysql.createConnection({
        host: "localhost",
        port: "3306",
        user: "root",
        password: "123456",
        database: "sy126",
    })
    conn.connect()
    conn.query(spl, (err, result) => {
        if (err) throw err
        callback(result)
    })
    conn.end()
}
module.exports = excSql